package com.baike.config;

import java.io.FileWriter;
import java.io.IOException;

public class AlipayConfig {
    //↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

    // 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
    public static String app_id = "2021000118621174";

    // 商户私钥，您的PKCS8格式RSA2私钥
    public static String merchant_private_key = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCHOkai+dBfyhoJw7CQSqLc5Ko2pGoz3E+P3Ps+Ol8VL9W1X5KXhf6Clnkew2eqZIzp9hO7Lo+HipK33iN2+XRvqbyR5TALrStElAtYCUWaP50WeG+LMtauuBRhUOBPmbewrhsLGtM7yA+XPUElg4p8nB0BAM56/58Z8aRwUd6taW+JCz5DBcAZhiO85mF8XkWeASkb6LQdnBGMLmIZS+Of7LM8smXEdUpjQYs+2q59Xmv7iVNtAAvzZ7qQod4eJVkUvVcJjOM5SjDNRD4yyZuK17dMI4MaZPECU+BHDakk7tneUx6H8L2DJJyGFs0CSE9hOolAJZJ8cU6xaEvN7+x5AgMBAAECggEAfBTOEedV+z8v6zvDvHKvxC6RvPfad2G1I5Wqd+wJqSAuYXGjyiNqaJr34nF8os4GuvtQGZZcnwtZGxvawOWeoINIAzsgfeZU6GVLj2lak3HBi4fRGhH5CXLhSHZ0jLXI5narW+IuZxFotObA61Iq9bItruj1jckWTTD8KRAGWmkhISSyWQGde41XxoW8jNwAthZJLyRZF/hdHUCYdEGarFrpCm9QZW2b1eJ5jldOGZ/icgaQbDzX45KgHZSbGzhU8eNRGQJd7iWpMTaMUG0kK2Pc5wSfmipwIpJ1PTRHMLvMARGi7Q1Q15H+Y6etipTtM3RdpAAvUNUl+vxrRpU9AQKBgQDqQD2qyp5AYYjZgDFhlQYMKx4komzpKDKDWSV+oJuUqUe+BxhBUB9IRzLfLO6YluCpx3Gkxa9X6VorUJJYnURLr8+mSU7DRxUebYq7Ly9d8S4FTTXtSPQTGfpAm9DYxrUqeKDQxOHuq+uq94jWrRGkxTEOwtmu+LN19maGz47jWQKBgQCTyGoMKPiwZu07GXki2hKrb6oH68RgCl9N1XTmkSU6zDytxQwl34Zxu4w8wr2vh8vwknNpfVBNdW1kZ/E1RmxUraJZOmOrFjyePs9ZMDO7Tjf3R8pHT09e6yuGRcWcCjY1TfXjqfLRbN0x6sEX4cJij5mDLB5nlzhVFFgu2svOIQKBgQCmGWMgpYdM01v8DX/2V3rwSeqXw2xCbzRSGnYRscRfxyCNx+4U8cEcuQ+DXBLas7Ed8cPNODc6uMYtDHaYyvrQSBuPJ0/n+5EoADhsvepyTD97luH0HNSkbrkZ8uJFs7BmKx6sqc4iNFlo4xhuUE3Abep5MwSzorltnYfZc3c4EQKBgF5+/mB8KlkR14u8xBqm+t0ob77U4SLQPxST80YjdXzdb8dlglkNTviWhhusIoKFAMD5xFalzJ1bAvH7DN+WAls7E96eWXDirSw62XccPVf9sgeqngtvCT+WfKRFJRCb7wGyshI7b4q+Y8oxY/sTXqqLTAv2QBLZPSoZ8jEzsrJBAoGADz7vArLNk8ElTza+h9D0nXJ3aR+ffybT2kuT1SRzCsEez/jDvvSFfX62d4xXGtnHE7pDSBqte5J96v6WWQGd3rQBWFGttzOAKRfe8TsIRay2Io2dRNGEjp0AYBivrzRKiKMHtnEOTrNYuJZmWNhquwQoECATFU7kFwXC3G7Jkps=";

    // 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAq4+futZnc0WPduCgQVftEVqzscryH29fn/FA19PKdxOLhy/djy2LdgQ3gfSlTPNhRIR/tkefpmzMt71zZz7+QwjlYmKCjv1p8OgzuNIxX08WO7i5WRjqiG4k57IflGW9R6P3C3ZcGhhAlbV/yAftTYYWnWrhbUGDZpSkf/XID421k4UWeeJRhLvzxrpDLYK7yssHtq/lIDXiK0f+k593imTHmg2yFGXHSOuMMjDrsmgk7JHBfLwMeGkCxz/HQ7GvJYQ43qSmxodfFSlC2LpjGAl8+j9/ovGlHyLBjdDrPue+U4FuRDHlSNtvG1o8NwBaRl740mdLOOakPQwXGFO9OwIDAQAB";

    // 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String notify_url = "http://4373313qm6.zicp.vip/pay/api/alipayCallback/notifyUrl";

    // 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String return_url = "http://10.58.6.24:8765/pay/api/alipayCallback/returnUrl";

    // 签名方式
    public static String sign_type = "RSA2";

    // 字符编码格式
    public static String charset = "utf-8";

    // 支付宝网关
    public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";

    // 支付宝网关
    public static String log_path = "E:\\log\\";


//↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

    /**
     * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
     * @param sWord 要写入日志里的文本内容
     */
    public static void logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
